<?php

namespace app\index\model;

use think\Model;
use think\Session;

class Address extends Model
{
    protected $table='address';

    //添加收货地址的方法
    public function addAddress($data){

        $data['uid']=Session::get('user.uid');
        $data['s_address']=implode('|',$data['s_address']);
        $res=$this->save($data);
        if ($res){
            return ['res'=>1,'msg'=>'添加成功'];
        }
    }



}
